1. Field of the Invention
The present invention relates to an apparatus and method for controlling an Ethernet switch's bandwidth.
2. Description of the Related Art
The Institute of Electrical and Electronic Engineers standard number 802.3 titled “Local and Metropolitan Area Networks” (802.3 Standard) defines an Ethernet switch. Ethernet is a common Local Area Network (LAN) having a maximum of 1024 nodes in one network.
FIG. 1 is a schematic view of an Ethernet switch. Referring to FIG. 1, an address lookup section 100 checks source and destination addresses of a received data packet to configure a lookup table 102, and determines a port to which the received packet may be transmitted. A queue manager 104 controls the order in which data packets are transmitted to first, second, third, . . . , nth ports (110-1, 110-2, 110-3, . . . , 110-n) based on received order (or sequence) and priority of data packets. A memory manager 120 manages a packet memory 130 in which data packets are stored.
First, second, third, . . . , nth port controllers (140-1, 140-2, 140-3, . . . , 140-n) checks whether a received data packet has errors, and extracts an address from the received data packet to output the extracted address to the address lookup section 100. The first, second, third, . . . , nth port controllers (140-1, 140-2, 140-3, . . . , 140-n) store the received data packet in the packet memory 130 responsive to the memory manager 120, reads data packets from the packet memory 130, and transmits the data packets to the ports 110-1, 110-2, 110-3, . . . 110-n.
The first, second, third, . . . , nth port controllers (140-1, 140-2, 140-3, . . . , 140-n) control the bandwidth of the ports 110-1, 110-2, 110-3, . . . 110-n. For example, the first, second, third, . . . , nth port controllers (140-1, 140-2, 140-3, . . . , 140-n) may reduce the bandwidth from 100 Mbps to 500 Mbps or 250 Mbps as appropriate.
According to a conventional method of controlling (or restricting) bandwidth of the Ethernet switch, the quantity of data, e.g., number of frames, is controlled (or restricted) during a predetermined time slot. The conventional method has a drawback. The quantity of data to be transmitted via a corresponding port of the Ethernet switch may be restricted. In particular, after a predetermined quantity of data are transmitted via the corresponding port of the Ethernet switch, no more data may be transmitted before the time slot expires when the Ethernet switch has to transmit larger quantity of data than the bandwidth allocated to it.
FIG. 2 is a block diagram showing a conventional port controller. As shown in FIG. 2, a port controller 200 transmits the data frame stored in a packet buffer 210 to Media Access Control (MAC) transmitting section 220 corresponding to an OSI 7 data link layer. The port controller 200 transmits data frame size information (Tx data count) to a bandwidth control section 230.
The bandwidth control section 230 counts the data packets that are transmitted to the MAC transmitting section 220 using the size information (Tx data count) outputted from the port controller 200. A timer 240 is reset by a reset signal outputted from the bandwidth control section 230 when a data packet begins to be transmitted. The timer 240 counts up to a predetermined time slot.
And the bandwidth control section 230 stops transmitting a Tx enable signal when the counting corresponds to a predetermined restricted bandwidth. The port controller 200 stops transmitting data frames when it fails to receive the Tx enable signal.
When the output of the timer 240 reaches the predetermined time slot, the timer 240 transmits an expire signal to the bandwidth control section 230. The bandwidth control section 230, in turn, outputs the Tx enable signal to the port controller 200 responsive to the expire signal. Thus, when the port controller 200 receives the Tx enable signal, the port controller 200 transmits data frames.
The bandwidth is controlled depending on the maximum quantity of data frames that may be transmitted during the predetermined time slot.
In the conventional bandwidth control apparatus shown in FIG. 2, the packet frames are not distributed uniformly during the overall time interval for transmitting packet frames but are concentrated in a specific time interval. For example, in the case where the bandwidth is restricted to 1/16 of the bandwidth allocated to a specific port of the Ethernet switch, packet frames are concentrated during a 1/16th time interval of the overall time interval and none of data frames are transmitted during a 15/16th time interval when data frames are transmitted via the specific port.
Overloads, therefore, commonly occur at the specific ports.
An other conventional apparatus controls the ports' bandwidth using Inter Frame Gap (IFG) that exists between neighboring data frames.
FIG. 3 is a block diagram showing a conventional port controller using the IFG. As shown in FIG. 3, a port controller 300 transmits the data frame stored in a packet buffer 310 to a MAC transmitting section 320. The port controller 300 transmits frame length information to a bandwidth control section 330.
The bandwidth control section 330 outputs IFG time information responsive to the frame length information to the port controller 300. The IFG time information represents a period of time that is required for transmitting a previous data frame according to the frame length information. The port controller 300, therefore, stops-transmitting data frames during the period of time required for transmitting the previous data frame according to the IFG time information. The port controller 300 begins transmitting the data frame stored in the packet buffer 310 after the IFG time expires.
For example, in case the bandwidth has to be restricted to about ½ of the maximum bandwidth allocated to a specific port of the Ethernet switch, the IFG time is the same as the period of time required for transmitting the previous data frame. Thus, the bandwidth is restricted to ½ because the period of time during which the data frame is transmitted is the same as the period of time during which the data frame is not transmitted.
Compared with the bandwidth control method shown in FIG. 2, the bandwidth control method shown in FIG. 3 may be simply embodied without using the timer. The port controller 300, however, further requires another counter for counting the IFG time according to the IFG time information outputted from the bandwidth control section 330.
In addition, in the Ethernet network, the data frames have various lengths, for example 64 bytes˜1518 bytes. Thus, the bandwidth control method using the IFG time has a drawback. The data frame may not be efficiently transmitted depending upon the length of the previous data frame.
When the length of the previous data frame is 1518 bytes, for example, a present data frame is transmitted after 1518 data bytes are transmitted even though the length of the present data frame is shorter than the length of the previous data frame. Therefore, the bandwidth control method using the IFG time may effectively prevent data frames from being transmitted where the total bandwidth is larger than the maximum bandwidth allocated to the specific port. However, in case a specific data frame having a length lower than a predetermined bandwidth is transmitted, the specific data frame may be greatly delayed depending upon length of the IFG time.
Accordingly, a need remains for an improved Ethernet switch.